/*
**	$VER: ahi_sub.m 4.1 (2.4.97)
**
**	ahi/[driver].audio definitions
**
**	(C) Copyright 1994-1997 Martin Blom
**	All Rights Reserved.
**
** (TAB SIZE: 3)
*/
/*****************************************************************************/
MODULE	'utility/tagitem',
			'utility/hooks',
			'devices/ahi',
			'libraries/iffparse'

/*****************************************************************************/
/*** STRUCTURES */
/* AHIAudioCtrlDrv */
OBJECT AHIAudioCtrlDrv
	AudioCtrl:AHIAudioCtrl,
	Flags:ULONG,                /* See below for definition */
	SoundFunc:PTR TO Hook,      /* AHIA_SoundFunc */
	PlayerFunc:PTR TO Hook,     /* AHIA_PlayerFunc */
	PlayerFreq:Fixed,           /* AHIA_PlayerFreq */
	MinPlayerFreq:Fixed,        /* AHIA_MinPlayerFreq */
	MaxPlayerFreq:Fixed,        /* AHIA_MaxPlayerFreq */
	MixFreq:ULONG,              /* AHIA_MixFreq */
	Channels:UWORD,             /* AHIA_Channels */
	Sounds:UWORD,               /* AHIA_Sounds */
	DriverData:PTR,             /* Unused. Store whatever you want here. */
	MixerFunc:PTR TO Hook,      /* Mixing routine Hook */
	SamplerFunc:PTR TO Hook,    /* Sampler routine Hook */
	Obsolete:ULONG,
	BuffSamples:ULONG,          /* Samples to mix this pass. */
	MinBuffSamples:ULONG,       /* Min. samples to mix each pass. */
	MaxBuffSamples:ULONG,       /* Max. samples to mix each pass. */
	BuffSize:ULONG,             /* Buffer size ahiac_MixerFunc needs. */
	BuffType:ULONG,             /* Buffer format (V2) */
	PreTimer/*()(BOOL)*/,           /* Call before mixing (V4) */
	PostTimer/*()*/                 /* Call after mixing (V4) */

/*** TAGS */
CONST	AHIDB_UserBase=AHI_TagBase+500	/* Use for driver specific tags */

/*** DEFS */
/* AHIsub_AllocAudio return flags */
FLAG	AHISF_ERROR,
		AHISF_MIXING,
		AHISF_TIMING,
		AHISF_KNOWSTEREO,
		AHISF_KNOWHIFI,
		AHISF_CANRECORD,
		AHISF_CANPOSTPROCESS

/* AHIsub_Start() and AHIsub_Stop() flags */
FLAG	AHIS_PLAY,
		AHIS_RECORD

/* ahiac_Flags */
FLAG	AHIAC_VOL,
		AHIAC_PAN,
		AHIAC_STEREO,
		AHIAC_HIFI,
		AHIAC_PINGPONG,
		AHIAC_RECORD,
		AHIAC_MULTTAB		/* Private! */

/* AHIsub_Set#? and AHIsub_(Un)LoadSound return code */
CONST	AHIS_UNKNOWN=~0

/* IFF chunk names for the audio mode file */
#define ID_AHIM 		"AHIM"	/* AHI Modes */
#define ID_AUDN 		"AUDN"	/* AUDio driver Name */
#define ID_AUDD 		"AUDD"	/* AUDio driver Data */
#define ID_AUDM 		"AUDM"	/* AUDio Mode */
